import java.util.Stack;

public class MyStack {
	public static void main(String[] args) {
		Stack<Integer> stack = new Stack<>();
		
		stack.push(5);
		stack.push(10);
		stack.push(15);
		
		System.out.println(stack);
		
		int x = stack.pop();
		System.out.println(x);
		System.out.println(stack);
		
		int top = stack.peek();
		System.out.println(top);
		System.out.println(stack);
		
		boolean isEmpty = stack.isEmpty();
		System.out.println("是否为空"+isEmpty);
		
		int postation = stack.search(5);
		System.out.println("元素的位置是："+postation);
	}
}